package com.zhuangjie.shop.dto;

import com.zhuangjie.shop.entity.DishFlavor;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 菜品保存dto
 *
 * @author zhuangjie
 * @date 2023/10/12
 */
@Data
public class DishSaveDTO {


    @ApiModelProperty(value = "商品id")
    private Long id;

    @NotNull(message = "商品分类不能为空")
    @ApiModelProperty(value = "商品分类_分类id")
    private Long dishCategoryId;

    @ApiModelProperty(value = "商品名称")
    @NotBlank(message = "商品名称不能为空")
    private String name;

    @ApiModelProperty(value = "商品样品图片")
    @NotNull(message = "商品图片不能为空")
    private String image;

    @ApiModelProperty(value = "标签项(多个标签用逗号隔开)")
    private String labels;

    @ApiModelProperty(value = "商品描述")
    private String describe;

    @ApiModelProperty(value = "商品原价")
    private BigDecimal oldPrice;

    @ApiModelProperty(value = "商品现价")
    @NotNull(message = "商品的现价不能为空")
    private BigDecimal nowPrice;

    @ApiModelProperty(value = "菜品的口味")
    private List<DishFlavor> flavors;

}
